<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="nofollow, noindex">
    <title><?php echo $this->config->item('site_name'); ?>
    </title>
    <meta name="description"
          content="<?php echo $this->config->item('meta_description'); ?>">
    <meta name="author"
          content="<?php echo $this->config->item('meta_google_plus'); ?>">
    <meta name="keywords"
          content="<?php echo $this->config->item('meta_keywords'); ?>">

    <!-- Twitter -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site"
          content="@<?php echo $this->config->item('Twitter_handle'); ?>">
    <meta name="twitter:creator" content="">
    <meta name="twitter:title" content="">
    <meta name="twitter:description"
          content="<?php echo $this->config->item('meta_description'); ?>">
    <meta name="twitter:image" content="">
    <!-- Facebook Open Graph -->
    <meta property="og:title" content=""/>
    <meta property="og:type" content=""/>
    <meta property="og:description" content=""/>
    <meta property="og:image" content=""/>
    <meta property="og:url" content=""/>
    <meta property="og:site_name"
          content="<?php echo $this->config->item('site_name'); ?>"/>
    <!-- Google Plus -->
    <meta itemprop="name" content=""/>
    <meta itemprop="image" content=""/>
    <meta itemprop="description"
          content="<?php echo $this->config->item('meta_description'); ?>"/>

    <!-- Styles -->

    <?php
    // add logic if user is logged in to flush the assets cache
    // Assets::clear_cache();
    ?>

    <?php Assets::css($this->config->item('theme_css')); ?>
    <link
        href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"
        rel="stylesheet">
    <link href="<?= base_url(); ?>assets/css/style.css" rel="stylesheet">
    <link href="<?= base_url(); ?>assets/css/ypstyle.css" rel="stylesheet">
    <link href="<?= base_url(); ?>assets/css/jquery-ui.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!-- JS -->

    <?php Assets::cdn($this->config->item('theme_jscdn')); ?>
    <?php Assets::js($this->config->item('theme_js')); ?>

    <script src="<?= base_url(); ?>assets/js/jquery-ui-1.10.3.custom.js"></script>
    <!--
    For Date Of Birth
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.js"></script>
      -->
    <!-- favicon -->
    <link rel="shortcut icon"
          href="<?php echo base_url('assets/img/ico/favicon.ico'); ?>">
</head>


<body data-baseurl="<?= base_url(); ?>">

<section class="header">
    <?php
    if (isset($template['partials']['header']))
        echo $template['partials']['header'];
    ?>
</section>

<div class="wrapper">
<?php
if ($template['breadcrumbs']) {
    ?>

    <div class="row">
        <div class="container">
            <div class="col-lg-12">
                <ul class="breadcrumb">
                    <li><a href="<?= base_url(); ?>"><i class="fa fa-lg fa-home"></i> </a>
                    </li>
                    <?php
                    foreach ($template['breadcrumbs'] as $breadcrumbs):
                    ?>

                    <li>
                        <?php if ($breadcrumbs['uri']) { ?>
                            <?php echo anchor($breadcrumbs['uri'], $breadcrumbs['name'], "title=" . $breadcrumbs['name'] . "");

                        } else {
                            echo $breadcrumbs['name'];
                        }

                        endforeach;

                        ?>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<?php } ?>


<!-- PAGE CONTENT -->
<div class="row">
    <div class="container">

        <div class="col-lg-12">
            <?php if (!get_session('mem_id')) { ?>
                <div class="clearfix m-bot-35">
					<span class="font18"> <i
                            class="fa fa-3x fa-user pull-left fa-border yellow"></i> Welcome,
						<strong></strong>
					</span> <a href="logout" class="btn btn-xs btn-danger pull-right"><i
                            class="fa fa-lg fa-lock "></i> Logout</a>
                    <hr class="soft-line">
                    <!-- <p>
                        <span><strong class="text-danger">Last Login :</strong> 12th
                            December, 2014 22:52:12 on 192:168:12:1</span>
                    </p> -->
                </div>
            <?php } else { ?>




                <div class="clearfix m-bot-35">
					<span class="font18"> <i
                            class="fa fa-3x fa-user pull-left fa-border yellow"></i> Welcome,
						<strong><?= get_session('mem_name'); ?></strong>
						
					</span>

                    <a href="<?= base_url(); ?>member/out" class="btn btn-xs btn-danger pull-right"><i
                            class="fa fa-lg fa-lock "></i> Logout</a>
                    <hr class="soft-line">
                    <p>
                        <span><strong class="text-danger">Last Login
                                :</strong> <?= get_session('mem_last_login_date'); ?>
                            on <?= get_session('mem_last_login_ip'); ?></span>
                    </p>
                </div>

            <?php } ?>
        </div>

        <div class="clearfix">
            <div class="col-lg-3">
                <?php echo $this->load->view('menu'); ?>
            </div>

            <div class="col-lg-9 ">

                <div class="member clearfix m-bot-35">
                    <div class="panel">
                        <div class="panel-head">
                            <div id="title">
                                <?= $title; ?>
                            </div>
                        </div>
                        <div class="panel-body">
                            <?php echo $template['body']; ?>
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
</div>
<!-- End Row -->

<!-- /container -->
</div>

<?php
if (isset($template['partials']['footer']))
    echo $template['partials']['footer'];
?>
</body>
</html>
